home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / sgml / unix / sgmlc / vmxtrn.c < prev   
Encoding:
C/C++ Source or Header  |  1991-07-03  |  5.0 KB  |  87 lines

  1. /******************************************************************************/
  2. /* Use shortened external names.  Remove /X from parameter message.           */
  3. /******************************************************************************/
  4. #include "vmincl.h"           /* Include files for VM. */
  5. /******************************************************************************/
  6. /* VMXTRN: Storage allocation and initialization for VM public variables.
  7. */
  8. /******************************************************************************/
  9. /* Scalar variables.
  10. */
  11. int boundsw = '3';            /* 1=prefix RS; 2=trim RE; 3=both; 0=neither. */
  12. int cdirsw = 0;               /* 1=search current dir only; 0=use path. */
  13. int eltrsv = 1;               /* Save eltrsw during prolog. */
  14. int eltrsw = 0;               /* 1=trace element structure in error msg; 0=no.*/
  15. int tpes = 1;                 /* Index of current source in stack. */
  16. int prntmax = 10;             /* Number of data or PI chars to print. */
  17. int src = 0;                  /* Return code from call to SGML services. */
  18. int srmsw = 0;                /* 1=SHORTREF maps in use; 0=not used. */
  19. int suppsw = 0;               /* 1=suppress parsing info; 0=report it. */
  20. int tpts = 0;                 /*Current index in tptags(initialize each pass).*/
  21. UNCH *curfile = 0;            /* Current file for messages. */
  22. UNS cnterr = 0;               /* Number of errors reported. */
  23. UNS readcnt = 512;            /* Number of bytes for DOS file read. */
  24. /******************************************************************************/
  25. /* Arrays and structures.
  26. */
  27. UNIV srcbp = 0;               /* Ptr to SGML's RCB/IPB. */
  28. struct ad *alptr = 0;         /* Current attribute list (tag or data). */
  29. struct entity *oldent = 0;    /* Most recent entity parsed. */
  30. struct ipbt it = {0};         /* IPB: To SGML for parsing and services. */
  31. struct ipbt *itlpu = ⁢     /* Address of it. */
  32. struct source tpscbs[ENTLVL+1] = {0}; /* Stack of open sources ("SCB stack"). */
  33. struct switches tpsw = {0};   /* Parser control switches set by text proc. */
  34. UNCH pd[2*LITLEN+FILESPEC+6] = {0}; /* Place for data copied from SGML space. */
  35.  UNCH *ld = pd+LITLEN+2;       /* In pd: Buffer for copied literal. */
  36.  UNCH *path = pd+2*LITLEN+4;   /* In pd: File ID buffer: len+path\fileid+EOS. */
  37. UNCH tptags[TAGLVL+1][NAMELEN+1] /* Text processor element structure stack. */
  38.      = {"*DOC"};
  39. /******************************************************************************/
  40. /* Constants.
  41. */
  42. UNCH *eminmsg[] = {           /* End-tag minimization messages. */
  43.      "%s end-tag found;",
  44.      "Short (no GI) %s end-tag found;",
  45.      "NET delimiter %s end-tag found;",
  46.      "Data tag %s end-tag found;"
  47. };
  48. UNCH *genext[] = {            /* Generated external entity file types. */
  49.      /* Dummy    */  NULL,    /* Dummy entry to use zero position in array.*/
  50.      /* 6*0*1    */  ".NSD",  /* Non-SGML data entity. */
  51.      /* 6*0*2    */  ".GML",  /* GML document or text entity. */
  52.      /* 6*0*3    */  ".SPE",  /* System parameter entity. */
  53.      /* 6*0*4    */  ".DTD",  /* Document type definition. */
  54.      /* 6*0*5    */  ".LPD",  /* Link process definition. */
  55.      /* 6*0*6    */  ".DCN",  /* Data content notation. */
  56.      /* 6*1*1    */  ".PNS",  /* Public non-SGML data entity. */
  57.      /* 6*1*2    */  ".PGE",  /* Public general entity. */
  58.      /* 6*1*3    */  ".PPE",  /* Public parameter entity. */
  59.      /* 6*1*4    */  ".PDT",  /* Public document type definition. */
  60.      /* 6*1*5    */  ".PLP",  /* Public link process definition. */
  61.      /* 6*1*6    */  ".PCN",  /* Public data content notation. */
  62.      /* 6*2*1    */  ".VNS",  /* Display version non-SGML data entity. */
  63.      /* 6*2*2    */  ".VGE",  /* Display version general entity. */
  64.      /* 6*2*3    */  ".VPE",  /* Display version parameter entity. */
  65.      /* 6*2*4    */  ".VDT",  /* Display version document type definition.*/
  66.      /* 6*2*5    */  ".VLP",  /* Display version link process definition.*/
  67.      /* 6*2*6    */  ".PCN"   /* ***** CANNOT OCCUR ****                */
  68. };
  69. UNCH *realmsg[] =             /* Real tag portion of minimization messages.*/
  70.      {"short (no GI)", "data", "short (no GI)", "NET delimiter"};
  71. UNCH *msgfptr = "SGML.MSG";   /* Pointer to SGML message file id. */
  72. UNCH options[] =              /* Text for invalid option error message. */
  73.      "/c10 /d /e /f /g /mSGML.MSG /p1 /r /s /t3";
  74. /******************************************************************************/
  75. /* Conditional inclusions
  76. */
  77. #ifdef V2
  78. UNCH *formats[] = {           /* Formatting procedures for chainsaw sculpture.*/
  79.     NULL,                     /* Dummy: to synchronize subscripts. */
  80.     "P",                      /* FORMATP: Phrase */
  81.     "B",                      /* FORMATB: Block */
  82.     "S",                      /* FORMATS: Structure */
  83.     "N"                       /* FORMATN: Non-SGML data */
  84. };
  85. #endif
  86. /******************************************************************************/
  87.